<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Live Stream Component</title>

<script type= "text/javascript">
function verify(channel)
{
	
	var link = document.getElementById("channel").value;
	correct = link.substring(0,29)
	if (correct == "http://www.ustream.tv/channel"){
		
		document.getElementById('submit').disabled = false;
		
	}
	else{
		alert("The link entered is incorrect. Please enter the correct link.")
		
	}
		
		
}
	
	
</script>
</head>
<body>



	<form action= "/verifyChannel/" method = "POST">

		{% csrf_token %}
		<label>Please enter your uStream.tv Channel Link</label><br/>
		<p> Click on share and copy to clipboard </p> 
		<input type= "text" id="channel" name="channel"></input>
	
		<button type="submit" value ="Submit"  > Submit </button>
		
	
	
		<p>If you don't have a channel on uStream.tv, please sign up.</p>
		<a href ="http://www.ustream.tv/login-signup?ref=%2Fdashboard" target="_blank"> Sign up on uStream.tv!</a>
	
	</form>
	
<p> <font color = "RED">{{errormsg}} </font></p>


		
        
		<form action="/addChannel/" method="POST">
 {% if isCorrect  %}

		{% csrf_token %}
		<input type="submit" name="name" value="next" id = "submit" />
{% else %}
		<input type="submit" name="name" value="next" id = "submit" disabled = "true"/>
		
		{% endif %}
				</form>
		
		
</body>



</html>